/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ditt.swing;

import javax.swing.*;
import java.awt.*;

/**
 *
 * @author attobra
 */
public class Editeur {
     public static void main(String[] args){
        
        JFrame fenetre = new JFrame("Editeur");
        JToolBar outils = new javax.swing.JToolBar();
        Container panneau = fenetre.getContentPane();
        panneau.setLayout(new java.awt.BorderLayout(5,5));
        panneau.add(outils,BorderLayout.NORTH);
        
        Chargeur chargeurIcone = new Chargeur("/toolbarButtonGraphics/general/");
        outils.add(new javax.swing.JButton(chargeurIcone.getIcon("New16.gif")));
        outils.add(new javax.swing.JButton(chargeurIcone.getIcon("Copy16.gif")));
        outils.add(new javax.swing.JButton(chargeurIcone.getIcon("Paste16.gif")));
        
        JTextArea editeur = new javax.swing.JTextArea(10, 50);
        panneau.add(new JScrollPane(editeur),BorderLayout.CENTER);
        
        JLabel etat = new JLabel("Application demar\u00e9ee");
        etat.setBorder(BorderFactory.createLoweredBevelBorder());
        
        panneau.add(etat,BorderLayout.SOUTH);
        
        fenetre.pack();
        
        fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        
        fenetre.setVisible(true);
        
     }
     
     
     
    
}

class Chargeur{
    
    private String chemin;

    public Chargeur (String chemin){
        this.chemin = chemin;
    }
    
    public ImageIcon getIcon(String nomImage){
        java.lang.Class maclasse = this.getClass();
        return new javax.swing.ImageIcon( maclasse.getResource(this.chemin+nomImage));
    }
    
    
    
    
    
}
